package impl.reasoning;

import java.util.Comparator;
import java.util.Map;

import org.semanticweb.owlapi.model.OWLNamedIndividual;

public class UtilityReasoningResultComparator implements Comparator<OWLNamedIndividual> {

	Map<OWLNamedIndividual, ChoiceResult>	base;

	public UtilityReasoningResultComparator(Map<OWLNamedIndividual, ChoiceResult> base) {
		this.base = base;
	}

	@Override
	public int compare(OWLNamedIndividual a, OWLNamedIndividual b) {
		if (this.base.get(a).getUtility() >= this.base.get(b).getUtility()) {
			return -1;
		} else {
			return 1;
		}
	}
}